
/**
 *  \file obex_fsm.h
 *
 *  This file defines state and events related to OBEX FSM.
 */

/*
 *  Copyright (C) 2011. MindTree Ltd.
 *  All rights reserved.
 */

#ifndef _H_OBEX_FSM_
#define _H_OBEX_FSM_


#if 0
char event_option[] =
"    --------- EVENTS ---------\n\
\n\
    0x01 -> ev_obex_transport_connect_req    \n\
    0x02 -> ev_obex_transport_connect_ind    \n\
    0x03 -> ev_obex_transport_disconnect_req    \n\
    0x04 -> ev_obex_transport_disconnect_ind    \n\
    0x05 -> ev_obex_connect_req    \n\
    0x06 -> ev_obex_disconnect_req    \n\
    0x07 -> ev_obex_put_req    \n\
    0x08 -> ev_obex_get_req    \n\
    0x09 -> ev_obex_action_req    \n\
    0x0A -> ev_obex_setpath_req    \n\
    0x0B -> ev_obex_abort_req    \n\
    0x0C -> ev_obex_rsp    \n\
    0x0D -> ev_obex_session_req    \n\
    0x0E -> ev_obex_session_rsp    \n\
    0x0F -> ev_obex_unknown_req    \n\
    0x10 -> ev_obex_error_rsp    \n\
    17 -> Exit    \n\
\n\
Your Option - ";
#endif



/* Event Defines */
typedef enum
{
    ev_obex_transport_connect_req = 0x01,
    ev_obex_transport_connect_ind = 0x02,
    ev_obex_transport_disconnect_req = 0x03,
    ev_obex_transport_disconnect_ind = 0x04,
    ev_obex_connect_req = 0x05,
    ev_obex_disconnect_req = 0x06,
    ev_obex_put_req = 0x07,
    ev_obex_get_req = 0x08,
    ev_obex_action_req = 0x09,
    ev_obex_setpath_req = 0x0A,
    ev_obex_abort_req = 0x0B,
    ev_obex_rsp = 0x0C,
    ev_obex_session_req = 0x0D,
    ev_obex_session_rsp = 0x0E,
    ev_obex_unknown_req = 0x0F,
    ev_obex_error_rsp = 0x10

} EVENTS;

/* Level 0 State Defines */
typedef enum
{
    SL_0_IDLE = 0x00000001,
    SL_0_TRANSPORT_IN_CONNECT = 0x00000002,
    SL_0_TRANSPORT_CONNECTED = 0x00000004,
    SL_0_TRANSPORT_IN_DISCONNECT = 0x00000008,
    SL_0_IN_CONNECT = 0x00000010,
    SL_0_W4_CONNECT = 0x00000020,
    SL_0_IN_AUTH = 0x00000040,
    SL_0_W4_AUTH = 0x00000080,
    SL_0_CONNECTED = 0x00000100,
    SL_0_IN_DISCONNECT = 0x00000200,
    SL_0_W4_DISCONNECT = 0x00000400,
    SL_0_IN_SRM_PUT = 0x00000800,
    SL_0_IN_SRM_GET = 0x00001000,
    SL_0_W4_PUT_RSP = 0x00002000,
    SL_0_W4_GET_RSP = 0x00004000,
    SL_0_W4_ACTION_RSP = 0x00008000,
    SL_0_W4_SETPATH_RSP = 0x00010000,
    SL_0_W4_ABORT_RSP = 0x00020000,
    SL_0_IN_PUT_RSP = 0x00040000,
    SL_0_IN_GET_RSP = 0x00080000,
    SL_0_IN_ACTION_RSP = 0x00100000,
    SL_0_IN_SETPATH_RSP = 0x00200000,
    SL_0_IN_ABORT_RSP = 0x00400000

} STATES_LEVEL_0;

#endif /* _H_OBEX_FSM_ */

